3.8.98 \(\int \sqrt {\cos (c+d x)} (a+b \sec (c+d x)) \, dx\) [798]

Optimal. Leaf size=35 \[ \frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 b F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \]

[Out]

2*a*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+2*b*(cos(1/2*d*x+1
/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4310, 2827, 2720, 2719} \begin {gather*} \frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 b F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]),x]

[Out]

(2*a*EllipticE[(c + d*x)/2, 2])/d + (2*b*EllipticF[(c + d*x)/2, 2])/d

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 2827

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 4310

Int[(csc[(a_.) + (b_.)*(x_)]*(B_.) + (A_))*(u_), x_Symbol] :> Int[ActivateTrig[u]*((B + A*Sin[a + b*x])/Sin[a
+ b*x]), x] /; FreeQ[{a, b, A, B}, x] && KnownSineIntegrandQ[u, x]

Rubi steps

\begin {align*} \int \sqrt {\cos (c+d x)} (a+b \sec (c+d x)) \, dx &=\int \frac {b+a \cos (c+d x)}{\sqrt {\cos (c+d x)}} \, dx\\ &=a \int \sqrt {\cos (c+d x)} \, dx+b \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 b F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 32, normalized size = 0.91 \begin {gather*} \frac {2 \left (a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+b F\left (\left .\frac {1}{2} (c+d x)\right |2\right )\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]),x]

[Out]

(2*(a*EllipticE[(c + d*x)/2, 2] + b*EllipticF[(c + d*x)/2, 2]))/d

________________________________________________________________________________________

Maple [A]
time = 0.15, size = 152, normalized size = 4.34

method result size
default \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \left (b \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-a \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) \(152\)
risch \(-\frac {i a \sqrt {2}\, \sqrt {\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) {\mathrm e}^{-i \left (d x +c \right )}}}{d}-\frac {i \left (\frac {i b \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \EllipticF \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}}}+a \left (-\frac {2 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{\sqrt {{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \EllipticE \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \EllipticF \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}}}\right )\right ) \sqrt {2}\, \sqrt {\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) {\mathrm e}^{-i \left (d x +c \right )}}\, \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(390\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(1/2)*(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-2*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)
^2+1)^(1/2)*(b*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))-a*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2)))/(-2*sin(1/2*d*x+
1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.49, size = 107, normalized size = 3.06 \begin {gather*} \frac {-i \, \sqrt {2} b {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} b {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} a {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - i \, \sqrt {2} a {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

(-I*sqrt(2)*b*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) + I*sqrt(2)*b*weierstrassPInverse(-4,
0, cos(d*x + c) - I*sin(d*x + c)) + I*sqrt(2)*a*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c)
 + I*sin(d*x + c))) - I*sqrt(2)*a*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x +
 c))))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(1/2)*(a+b*sec(d*x+c)),x)

[Out]

Integral((a + b*sec(c + d*x))*sqrt(cos(c + d*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

Mupad [B]
time = 0.23, size = 33, normalized size = 0.94 \begin {gather*} \frac {2\,a\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,b\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^(1/2)*(a + b/cos(c + d*x)),x)

[Out]

(2*a*ellipticE(c/2 + (d*x)/2, 2))/d + (2*b*ellipticF(c/2 + (d*x)/2, 2))/d

________________________________________________________________________________________